Implementing extent granularity authorization processing in CAPI adapters

ABSTRACT

A method, system and computer program product are provided for implementing block extent granularity authorization processing for a Coherent Accelerator Processor Interface (CAPI) adapter. An Application Client requests authorization to a File from a system processor file system. The file system validates the request, determines the location of each Extent that comprises the File, and requests authorization to each Extent from a System CAPI Authorization manager. The System CAPI Authorization manager requests the CAPI Client manager to assign a Child Client ID and CAPI Server Register range to the requesting Application Client and requests a previously authorized CAPI Parent Client to authorize the Child ID to the list of Extents. The CAPI Parent Client sends a Create Authorizations command to the CAPI Adapter via the Parent&#39;s CAPI Server Registers. The CAPI Adapter validates the Parent Authorization Handle and CPI Server Register range for the specific Extent/Command/Resource, and creates an Authorization List by assigning a new Child Authorization Handle for each requested, validated Extent/Command/Resource. The Authorization List and the Child Client ID are returned to the File System.

This application is a continuation of Ser. No. 15/442,686 filed Feb. 26,2017, which is a continuation application of Ser. No. 14/628,785 filedFeb. 23, 2015, now U.S. Pat. No. 9,582,651 issued Feb. 28, 2017, acontinuation of Ser. No. 14/548,403 filed Nov. 20, 2014, now U.S. Pat.No. 9,600,642 issued Mar. 21, 2017.

FIELD OF THE INVENTION

The present invention relates generally to the data processing field,and more particularly, relates to a method, computer system and computerprogram product for implementing block extent granularity authorizationprocessing in Coherent Accelerator Processor Interface (CAPI) adapters.

DESCRIPTION OF THE RELATED ART

Persistent secondary storage is a component of virtually all computersystems. This storage is usually a block device such as a hard diskdrive or flash storage device. Storage adapters often are used toconnect a host computer system to peripheral storage I/O devices such ashard disk drives, solid state drives, tape drives, compact disk drives,and the like.

In a traditional computer system an application that needs to read orwrite data to the block device makes an Operating System (OS) and/orFile System (FS) call to read or write the requested blocks of data. TheOperating System or File System is a Trusted part of the computer systemand as part of a Read/Write request will verify or authenticate that theapplication is allowed to access the requested blocks of data. If theauthentication is successful, the OS will build a command for theRead/Write request and send the command to the Host Bus Adapter (HBA) toservice. Since the HBA can only receive commands from the OS, the HBAknows that the requested range of Blocks has been authenticated and issafe to execute the command.

IBM has introduced a new Block Device I/O model as part of the OpenPOWERFoundation. This new Block Device I/O model uses Coherent AcceleratorProcessor Interface (CAPI) technology. CAPI allows an application tobuild a Read/Write command for an input/output adapter (IOA) and send itdirectly to the IOA, bypassing the OS/FS and as such also bypasses thetraditional authentication. Without authentication, an application canget to data that it should not be allowed to access. For example, in aserver system that contains proprietary data for a first competitor anda second competitor, the lack of authentication would allow the firstcompetitor to access second competitor's data.

Current techniques for block device authorization outside of an OS/FSuse out-of-band techniques such as zoning having a granularity level ofthe block device or Logical Unit (LUN).

A need exists for an effective mechanism to implement block extentgranularity authorization processing for a Coherent AcceleratorProcessor Interface (CAPI) adapter in a computer system. It is desirablethat such mechanism enables effective and efficient utilization of theCAPI adapter, bypassing many host CPU requirements for performing IOoperations.

SUMMARY OF THE INVENTION

Principal aspects of the present invention are to provide a method,system and computer program product for implementing block extentgranularity authorization processing for a Coherent AcceleratorProcessor Interface (CAPI) adapter. Other important aspects of thepresent invention are to provide such method, system and computerprogram product substantially without negative effects and that overcomemany of the disadvantages of prior art arrangements.

In brief, a method, system and computer program product are provided forimplementing block extent granularity authorization processing for aCoherent Accelerator Processor Interface (CAPI) adapter. An ApplicationClient requests authorization to a File from a system processor filesystem. The file system validates the request, determines the locationof each Extent that comprises the File, and requests authorization toeach Extent from a System CAPI Authorization manager. The System CAPIAuthorization manager requests the CAPI Client manager to assign a(Child) Client ID and CAPI Server Register range to the requestingApplication Client and requests a previously authorized CAPI ParentClient to authorize the Child ID to the list of Extents. The CAPI ParentClient sends a Create Authorizations command to the CAPI Adapter via theParent's CAPI Server Registers. The CAPI Adapter validates the ParentAuthorization Handle and CPI Server Register range for the specificExtent/Command/Resource, and creates an Authorization List by assigninga new Child Authorization Handle for each requested, validatedExtent/Command/Resource. The Authorization List and the Child Client IDare returned to the File System.

In accordance with features of the invention, the Authorization Handledefines a CAPI client authorization for each extent, each extentincluding a resource space subset of a block device or Logical Unit(LUN).

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention together with the above and other objects andadvantages may best be understood from the following detaileddescription of the preferred embodiments of the invention illustrated inthe drawings, wherein:

FIGS. 1A and 1B, and FIG. 1C respectively illustrates an examplecomputer for implementing Coherent Accelerator Processor Interface(CAPI) authorization in a CAPI adapter and an example CAPI authorizationhandle array elements in accordance with the preferred embodiments;

FIGS. 2A and 2B illustrates example CAPI authorization operations tovalidate a command in accordance with the preferred embodiments;

FIGS. 3A, 3B, 3C, 3D, 3E and 3F illustrates example read command withCAPI authorization model and authentication process operations inaccordance with the preferred embodiments;

FIG. 4 illustrates example CAPI authorization model processingoperations in accordance with the preferred embodiments;

FIG. 5 illustrates example CAPI authorization initialization processingoperations in accordance with the preferred embodiments;

FIG. 6 illustrates example CAPI authorization processing operations inaccordance with the preferred embodiments;

FIG. 7 illustrates example CAPI authorization command flow processingoperations in accordance with the preferred embodiments;

FIG. 8 illustrates example CAPI authorization enforcement processingoperations in accordance with the preferred embodiments;

FIG. 9 illustrates example CAPI authorization mechanism and processingoperations in accordance with the preferred embodiments;

FIG. 10 illustrates example CAPI deauthorization processing operationsin accordance with the preferred embodiments;

FIGS. 11A and 11B illustrate example CAPI authorization read commandprocessing operations in accordance with the preferred embodiments; and

FIG. 12 is a block diagram illustrating a computer program product inaccordance with the preferred embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following detailed description of embodiments of the invention,reference is made to the accompanying drawings, which illustrate exampleembodiments by which the invention may be practiced. It is to beunderstood that other embodiments may be utilized and structural changesmay be made without departing from the scope of the invention.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

In accordance with features of the invention, a method, system andcomputer program product are provided for implementing CoherentAccelerator Processor Interface (CAPI) authorization in a CAPI adapterin accordance with the preferred embodiments.

Having reference now to the drawings, in FIGS. 1A and 1B, there is shownan example computer system generally designated by the referencecharacter 100 for implementing Coherent Accelerator Processor Interface(CAPI) authorization in a CAPI adapter 102 in accordance with thepreferred embodiments. Computer system 100 includes one or moreprocessors 104, or central processor units (CPUs) 104 (one shown)coupled to a system memory 106 and coupled by an I/O hub or CoherentAttach Processor Proxy (CAPP) 108 and Peripheral Component InterconnectExpress (PCI-Express or PCIE) connection to the CAPI adapter 102. TheCAPI adapter 102 includes an Authorization Table 112 containing multipleAuthorization Entries to implement authorization in accordance with thepreferred embodiments.

As shown in FIG. 1B, computer system 100 includes an example storagestack 120 including user CAPI client 122, an operating system 124including a file system 126, a hypervisor 128 coupled by CAPI/PCIEinterface block 130 to the CAPI adapter 102, which includes a filesystem authorization function 132 in accordance with the preferredembodiments. The CAPI/PCIE interface block 130 includes a CAPI transportmechanism that rides on top of a system transport mechanism or PCIE. TheCAPI client 122 is a unique system entity that has a separatelyidentified set of permissions to access CAPI adapter function.

Referring also to FIG. 1C, the authorization table 112 includesauthorization entries 140 to implement authorization in accordance withthe preferred embodiments. The illustrated example authorization entry140 includes a CAPI Client user ID 150, a CAPI server register space 152including resource and extents information and a CAPI set of allowedfunctions 154 including allowed access types in accordance with thepreferred embodiments.

In accordance with features of the invention, the CAPI server registerspace 152 is CAPI adapter system bus address space that containsmultiple copies of register(s) that can be used to start a command. Eachcopy is referred to as CAPI Server registers. Each CAPI Server registershave access to only the adapter Functions that the specific CAPI Serverregisters have previously been authorized to.

In accordance with features of the invention, a CAPI client ID is anindex to a specific copy of CAPI Server registers. One or more of theCAPI Clients is identified as Master Client(s). The CAPI Serverregisters for the Master Client are used to perform CAPI adapterinitialization functions and CAPI Server registers have access to allCAPI adapter functions.

Referring now to FIGS. 2A and 2B, there are shown example CAPIauthorization operations to validate a command in accordance with thepreferred embodiments. In FIG. 2A, example CAPI authorization operationsto validate a command are generally designated by the referencecharacter 200. Validation is done by the host, only authorized contextsmay write to the given MMIO space 202 shown in FIG. 2A and as indicatedin a block 222 in FIG. 2B. In FIG. 2A, an IO Adapter Request ControlBlock (IOARCB) 206 contains an authorization handle 208. As indicated atblock 222 in FIG. 2B and shown with authentication entry 140 in FIG. 2A,trusted handle data contains CAPI Server ID 214 and Resource and Range212. As indicated in a block 224, MMIO Space 202 is indexed by CAPIServer ID 214. As indicated in a block 226, Process Element 216 shown inFIG. 2A, is indexed by CAPI Server ID. As indicated in a block 228,Process Element 216 contains information needed to translate hostEffective Address to physical address.

Referring now to FIGS. 3A, 3B, 3C, 3D, 3E and 3F, there are shownexample read command operations including CAPI authorization model andauthentication process operations for a read command in accordance withthe preferred embodiments.

In FIG. 3A, example CAPI authorization operations for the read commandare generally designated by the reference character 300. Example CAPIauthorization operations 300 are shown with a user 302, OS 304,hypervisor 306, and CAPI adapter 102. Assume the OS is the “owning”context as indicated in a block 310 in FIG. 3B. As indicated in a block312, User does a syscall to “open” the file/hdisk. OS does an hcall toadd the user's context to the context list as indicated in a block 314.The hypervisor adds user's context to context list as indicated in ablock 316. The hypervisor does CAPI process to add the context into theadapter as indicated in a block 318.

In FIG. 3C, example CAPI authorization operations for the read commandare generally designated by the reference character 320. Example CAPIauthorization operations 320 are shown with user 302, OS 304, hypervisor306, and CAPI adapter 102. In FIG. 3D, as indicated in a block 322, thehypervisor returns the user's CAPI ID. The OS does a request to theadapter to “create authorization” and OS supplies User CAPI ID, andsupplies resource and extents to add the authorization as indicated in ablock 324. The adapter allocates an authorization handle for each extentand fills in the CAPI ID and extent information as indicated in a block326. As indicated in a block 328, the adapter returns the new userauthorization handle(s) to the operating system.

In FIG. 3E, example CAPI authorization operations for the read commandare generally designated by the reference character 330. Example CAPIauthorization operations 330 are shown with user 302, OS 304, hypervisor306, and CAPI adapter 102. In FIG. 3F, as indicated in a block 332 OSreturns authorization handle to the user. User sends a request to theadapter to issue the read as indicated in a block 334. Adapter uses theCAPI ID to identify which context to use as indicated in a block 336.Adapter uses the context to translate the host request address asindicated in a block 340.

As indicated in a block 342, adapter fetches the IO Adapter RequestControl Block (IOARCB). Adapter gets the authorization handle from theIOARCB as indicated in a block 344. Adapter verifies the authorizationhandle is the current version (all bits match) as indicated in a block346.

As indicated in a block 348 adapter verifies the authorization handle isfor the CAPI ID that was used. Adapter verifies that the range for therequest is allowed (data in the authorization handle data) as indicatedin a block 350. Adapter does the read as indicated in a block 352.Adapter translates the address and sends the data to the host (into theuser's memory) as indicated in a block 354. Adapter writes a queue,writes a memory location, generates an interrupt or whatever the desiredcompletion as indicated in a block 356.

In accordance with features of the invention, the CAPI authorizationmodel is based on split enforcement of rights, as illustrated anddescribed with respect to FIG. 4.

Referring now to FIG. 4, there are shown example CAPI authorizationmodel operations in accordance with the preferred embodiments startingat a block 400. As indicated in a block 402, the Trusted OS enforceswhich CAPI Server registers can be accessed by which Clients. This isaccomplished by, for example mapping a virtual address for a Client to aCAPI Server register space. As indicated in a block 404, the ParentClient (initially the Master Owning Client) notifies the CAPI adapter102 of which functions are allowed for a Child's CAPI Server. Asindicated in a block 406, the Parent Client sends a command orcommand(s) to its previously authorized CAPI Server register spaceidentifying the Functions, Commands, Extents, allowed to be sent to thenew Child's CAPI Server register space. As indicated in a block 408, theadapter generates and returns opaque Authorization Handle tokens asappropriate for each requested authorization element. The AuthorizationHandle is encoded in an implementation unique way to optimizeauthentication performance on the Read/Write commands. As indicated in ablock 410, the adapter enforces the functions allowed on each commandsent to a CAPI Server register space. At block 410, the Client sets theappropriate “Authorization Handle” in the Command; and the adapter usesthe “Authorization Handle” to validate the command is allowed to beexecuted by the receiving CAPI Server register space.

Referring now to FIG. 5, there are shown example CAPI authorizationinitialization process operations in accordance with the preferredembodiments starting at a block 500. As indicated in a block 502 adapterreset completes, and the Trusted OS Boot process transitions the adapterinto CAPI mode and identifies a Master Owning Client component and theadapter CAPI Server Register space assigned to the Master Owning Client.The Master Owning Client is default authorized to all Devices andfunctions under control of the adapter as indicated in a block 504. TheMaster Owning Client is identified as trusted as indicated in a block506. As indicated in a block 508, the Trusted OS creates an addressmapping for the Master Owning Client to access the CAPI Server Registerspace assigned to the Master Owning Client. This address mapping is notgiven to any other Client or Application.

The Master Owning Client can now send commands to the adapter asindicated in a block 510. As indicated in a block 512, other Clients orApplications do not have an address mapping to the Master OwningClient's Server register space and as such cannot send commands to theadapter via these registers.

Referring now to FIG. 6, there are shown example CAPI authorizationprocess operations in accordance with the preferred embodiments startingat a block 600. As indicated in a block 602, Application Client requestsauthorization to a file from the File system. The File system validatesthe request, determines the location of each Extent that comprises thefile, requests Authorization to each Extent from a System CAPIAuthorization manager as indicated in a block 604. The System CAPIAuthorization manager determines which CAPI Adapter is needed to serviceeach Extent, requests the CAPI Client manager to assign a (Child) ClientID and CAPI Server Register range to the requesting Application Client,and requests a previously authorized CAPI Parent Client (initially theMaster Client) to authorize the Child ID to the list of Extents asindicated in a block 606. As indicated in a block 608, The CAPI ParentClient sends a “Create Authorizations” command to the CAPI Adapter viathe Parent's CAPI Server Registers. Parameters are CAPI Child Client ID;List of Extents, for each Extent includes CAPI Parent AuthorizationHandle, and Extent Start LBA and number of Blocks; and List of otherCommands/Adapter resources, for each command/resource includes CAPIParent Authorization Handle. The CAPI Adapter validates that the ParentAuthorization Handle and CAPI Server Register range is valid for thespecific Extent/Command/Resource; creates an Authorization List byAssigning a new Child Authorization Handle for each requested, validatedExtent/Command/Resource; and returns the Authorization List to theParent Client as indicated in a block 610. The Parent Client returns theAuthorization List to Authorization Manager as indicated in a block 612.The Authorization Manager returns the Authorization List and the ChildClient ID to the File System and the File System returns theAuthorization List and the Child Client ID to the Application Client asindicated in a block 614.

Referring now to FIG. 7, there are shown example CAPI authorizationcommand flow process operations in accordance with the preferredembodiments starting at a block 700. As indicated in a block 702, theapplication client builds a command. parameters included are start LBAand number of LBAs; and child's authorization handle. As indicated in ablock 704, the application client sends the command directly to the CAPIadapter via the application clients's CAPI server registers. Asindicated in a block 706, the capi adapter uses the authorization handleand the receiving CAPI server register address to validate that therequesting client is authorized to perform the command. As indicated ina block 708, the CAPI adapter executes the command and sends completionback to the application client.

Referring now to FIG. 8, there are shown example CAPI authorizationenforcement process operations in accordance with the preferredembodiments starting at a block 800. As indicated in a block 802, accessto CAPI adapter server register spaces is enforced by the trusted OScreating address space mappings for individual clients/applications. Asindicated in a block 804, the adapter enforces access rights on eachcommand by verifying that the Authorization Handle passed in the commandbelong to the requesting Client and that the Client is authorized to therequested command/function/Extent.

Referring now to FIG. 9, there are shown example CAPI authorizationmechanism and process operations in accordance with the preferredembodiments starting at a block 900. As indicated in a block 902, encodethe Authorization Handle as multiple fields including Lookup TableIndex. The size of the Lookup Table Index field should be selected bythe implementation to maximize the number of potentially activeAuthorization Handles. The Authorization Handle includes ImplementationUnique Encode and the size of this field should be minimized but stillbe capable of detecting stale Credentials. As indicated in a block 904,create an Authorization Table containing multiple Authorization Entries.Each Authorization Entry contains Authorization Handle; CAPI Serverregisters ID; Start Logical Block Address of the Extent; and Range ofLogical Block Addresses for the Extent. As indicated in a block 906 theAuthentication Process when a command is received includes: Extract theLookup Table Index from the Authorization Handle contained in thereceived command. Use the Lookup table Index to locate the AuthorizationEntry. Compare the Authorization Entry's CAPI Server Registers ID to theReceiving CAPI Server Registers ID. Compare the Authorization Entry'sAuthorization handle to the Authorization Handle contained in thereceived command. Any Compare failures result in the command beingrejected.

Referring now to FIG. 10, there are shown example CAPI deauthorizationprocess operations in accordance with the preferred embodiments startingat a block 1000. As indicated in a block 1002, the Application ChildClient (or any Parent, GrandParent, and the like in the lineage) sends a“Delete Authorizations” command to the CAPI Adapter via the Client'sCAPI Server Registers. Parameters are: CAPI Child Client ID; List ofExtents. For each Extent include CAPI Child Authorization Handle; ExtentStart LBA and number of Blocks; and List of other Commands/Adapterresources. For each command/resource include CAPI Child AuthorizationHandle. As indicated in a block 1004, the CAPI Adapter validates thatthe Requester is either the Child or a Parent in the lineage; anddeletes the Authorizations in the Lists.

Referring now to FIGS. 11A and 11B, there are shown example CAPIauthorization read command processing operations in accordance with thepreferred embodiments. In FIG. 11A, example CAPI authorizationoperations for the read command are generally designated by thereference character 1100. Example CAPI authorization operations 1100 areshown with a user 1102, OS 1104, file system 1106, hypervisor 1108, andCAPI adapter 102. As indicated in a block 1102 in FIG. 11B, the OS goesto the filesystem and hypervisor to do the open. The hypervisor giveCAPI ID, filesystem does authorization checks and returns authorizationinformation and file handle (FH) as indicated in a block 1104. Asindicated in a block 1106, OS (at behest of filesystem) issues a createauthorization request. As indicated in a block 1108, Lseek only touchesuser filesystem. Read goes directly to CAPI Adapter as indicated in ablock 1110. As indicated in a block 1112, CAPI adapter validates CAPIID, authorization handle (AH), extents (filesystem authorization). Thenthe CAPI adapter does the operation (op), such as read request andresponds with the read data as indicated in a block 1114.

Referring now to FIG. 12, an article of manufacture or a computerprogram product 1200 of the invention is illustrated. The computerprogram product 1200 is tangibly embodied on a non-transitory computerreadable storage medium that includes a recording medium 1202, such as,a floppy disk, a high capacity read only memory in the form of anoptically read compact disk or CD-ROM, a tape, or another similarcomputer program product. Recording medium 1202 stores program means1204, 1206, 1208, and 1210 on the medium 1202 for carrying out themethods for implementing block extent granularity authorizationenforcement processing in the CAPI adapter 102 of a preferred embodimentin the system 100 of FIGS. 1A, and 1B.

A sequence of program instructions or a logical assembly of one or moreinterrelated modules defined by the recorded program means 1204, 1206,1208, and 1210, direct the computer system 100 for implementing blockextent granularity authorization enforcement processing in a CAPIadapter 102 of a preferred embodiment.

While the present invention has been described with reference to thedetails of the embodiments of the invention shown in the drawing, thesedetails are not intended to limit the scope of the invention as claimedin the appended claims.

What is claimed is:
 1. A method for implementing block extentgranularity authorization processing for a Coherent AcceleratorProcessor Interface (CAPI) adapter in a computer system comprising:providing a system processor; providing a file system, a System CAPIAuthorization manager, and a CAPI Client manager managing authorizationfunctions associated with the CAPI adapter; said processor using saidfile system, said System CAPI Authorization manager, and said CAPIClient manager to perform the steps of: responsive to receivingauthorization request to a File from an Application Client, validatingthe request, determining a location of each Extent that comprises theFile, said Extent including a resource space subset of a block deviceLogical Unit (LUN), and requesting authorization to each said Extent,assigning a Child Client ID and CAPI Server Register range to therequesting Application Client, requesting an authorized CAPI ParentClient to authorize the Child Client ID to the list of Extents; and theauthorized CAPI Parent Client sending a Create Authorizations command tothe CAPI Adapter via Parent CAPI Server Registers, the CAPI Adapterallocating an authorization handle for each said Extent including theChild Client ID, and Extent information; and said authorized CAPI ParentClient notifying the CAPI adapter of functions allowed for the ChildClient ID and CAPI Server Register range, and sending a commandidentifying functions, commands, Extents allowed to be sent to the ChildClient ID.
 2. The method as recited in claim 1, includes the CAPIAdapter using said CAPI Server Register range for assigning resourceownership to the CAPI Child client ID.
 3. The method as recited in claim2, wherein said CAPI Server Register range includes resource and Extentsinformation.
 4. The method as recited in claim 1, includes saidprocessor using said file system, said System CAPI Authorizationmanager, and said CAPI Client manager for providing said CAPI serverregister space with CAPI adapter system bus address space containingmultiple copies of registers used to start a command.
 5. The method asrecited in claim 4, includes mapping a virtual address for a CAPI clientto said CAPI Server Register space for enforcing specific CAPI Serverregisters to be accessed by respective CAPI clients.
 6. The method asrecited in claim 4, includes providing the CAPI Adapter with anauthorization table with a plurality of authorization entries includingsaid CAPI Child client identification (ID), said CAPI server registerspace and a CAPI set of allowed functions.
 7. The method as recited inclaim 6, wherein said authorization table with said plurality ofauthorization entries includes said authorization handle for each saidExtent.
 8. The method as recited in claim 1, includes providing atransport mechanism comprising a Coherent Accelerator ProcessorInterface (CAPI) and Peripheral Component Interconnect Express (PCIE).9. The method as recited in claim 1, includes providing an Extentauthorization function with an authorization table in the CAPI adapter.